
import react from "react";
import { Outlet,Link } from "react-router-dom";
import styles from './home.module.scss'
export default class App extends react.Component{
    constructor(){
        super();
        this.state={
            menuList:[]
        }
    }
    componentDidMount(){
        this.$axios.get('').then(res=>{
            if(res.data.msg=='操作成功'){
                this.state.menuList
            }
        })
    }
    render(){
        return <div>
            <Swiper></Swiper>
        </div>
        return <div className="home-category">
            <ul className="menu">
                {this.state.menuList.map(i=>{
                    return <li className="{active:tabIndex==index}" key={index,id}>
                        <link to="'/category'">{{item.name}}</link>
                    </li>
                })}
            </ul>
        </div>
    }
}